package com.weixing.mall.provider.api.fallback;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.provider.api.model.vo.ActGoodsVo;
import com.weixing.mall.provider.api.service.ActivityGoodsRpcService;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author wx
 * @Date 2020/1/9 15:18
 * @Version 1.0
 */
@Component
public class ActivityGoodsServiceFallback implements ActivityGoodsRpcService {

    @Override
    public Result<ActGoodsVo> selectByActIdAndItemId(Long itemId, Long actId) {
        return ResultUtil.error("活动服务不可用");
    }

    @Override
    public Result<List<ActGoodsVo>> selectByActIdAndGoodsId(Long goodsId, Long actId) {
        return ResultUtil.error("活动服务不可用");
    }

    @Override
    public Result divideStock(Long id, Integer cnt) {
        return ResultUtil.error("库存扣减失败");
    }

    @Override
    public Result<ActGoodsVo> selectByActTypeAndItemId(Integer actType, Long itemId) {
        return null;
    }
}
